package com.wenx.v3system.modular.platform.domain.maps;

import com.wenx.v3system.modular.platform.domain.dto.PlatformUserRoleDto;
import com.wenx.v3system.modular.platform.domain.po.PlatformUserRole;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 平台用户角色映射类
 * 
 * @author wenx
 */
@Mapper(componentModel = "spring")
public interface PlatformUserRoleMap {

    PlatformUserRoleMap INSTANCE = Mappers.getMapper(PlatformUserRoleMap.class);

    /**
     * DTO转PO
     */
    PlatformUserRole toPo(PlatformUserRoleDto dto);

    /**
     * PO转DTO
     */
    PlatformUserRoleDto toDto(PlatformUserRole po);

    /**
     * DTO列表转PO列表
     */
    List<PlatformUserRole> toPoList(List<PlatformUserRoleDto> dtoList);

    /**
     * PO列表转DTO列表
     */
    List<PlatformUserRoleDto> toDtoList(List<PlatformUserRole> poList);
} 